﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Category.aspx.cs" Inherits="Admin_Category" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head id="Head1" runat="server">
    <title>گروه آزمایش</title>
    <meta charset="utf-8">
    <link rel="icon" href="../App_Themes/Default/images/favicon.ico" type="image/x-icon">
    <link rel="shortcut icon" href="../App_Themes/Default/images/favicon.ico" type="image/x-icon" />
    <meta name="description" content="Your description">
    <meta name="keywords" content="Your keywords">
    <meta name="author" content="Fatehem Ramezani-fatemeh-ramezani.ir">
    <link href="../App_Themes/Default/css/B_Yekan.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/Default/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/Default/css/responsive.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/Default/css/style.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/Default/css/touchTouch.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/Default/css/kwicks-slider.css" rel="stylesheet" type="text/css" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet'
        type='text/css"' />
    <script src="../App_Themes/Default/js/jquery.js" type="text/javascript"></script>
    <script src="../App_Themes/Default/js/superfish.js" type="text/javascript"></script>
    <script src="../App_Themes/Default/js/jquery.flexslider-min.js" type="text/javascript"></script>
    <script src="../App_Themes/Default/js/jquery.kwicks-1.5.1.js" type="text/javascript"></script>
    <script src="../App_Themes/Default/js/jquery.easing.1.3.js" type="text/javascript"></script>
    <script src="../App_Themes/Default/js/jquery.cookie.js" type="text/javascript"></script>
    <script src="../App_Themes/Default/js/touchTouch.jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        if ($(window).width() > 1024) { document.write("<" + "script src='../App_Themes/Default/js/jquery.preloader.js'></" + "script>"); }
    </script>
    <script>
        jQuery(window).load(function () {
            $x = $(window).width();
            if ($x > 1024) {
                jQuery("#content .row").preloader();
            }

            jQuery('.magnifier').touchTouch();
            jQuery('.spinner').animate({ 'opacity': 0 }, 1000, 'easeOutCubic', function () { jQuery(this).css('display', 'none') });
        }); 
				
    </script>
    <!--[if lt IE 8]>
  		<div style='text-align:center'><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://www.theie6countdown.com/img/upgrade.jpg"border="0"alt=""/></a></div>  
 	<![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!-->
    <!--<![endif]-->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <link rel="stylesheet" type="text/css" href="../App_Themes/Default/css/docs.css" />
    <link rel="stylesheet" type="text/css" href="../App_Themes/Default/css/ie.css" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400' rel='stylesheet' type='text/css'>
  <![endif]-->
</head>
<body dir="rtl">
    <form id="Form2" runat="server">
    <div class="spinner">
    </div>
    <!--============================== header =================================-->
    <header>
          <div class="container clearfix" >
                <div class="row">
                      <div class="span12">
                        <div class="navbar navbar_">
                            <div class="container">                          
                                <h1 class="brand brand_">
                                    <a href="../Default.aspx">
                                     <img src="../App_Themes/Default/images/Logo.png" />
                                    </a>
                                </h1>                                                                                     
                                <div class="nav-collapse nav-collapse_  collapse">
                                      <ul class="nav sf-menu">
                                            <li><a id="A12" href="#" runat="server" onclick="if(!confirm('آیا قصد خروج از سیستم را دارید؟')) return false;"
                                                onserverclick="LogoutButton_Click">خروج از سیستم</a></li>
                                            <li><a id="A3" href="~/Admin/Confirm.aspx" runat="server">آزمایش تایید شده</a></li>                                                                                                                              
                                            <li class="sub-menu"><a> کاربری</a>
                                                <ul>
                                                    <li><a id="A10" href="~/Admin/User.aspx" runat="server">کاربران</a></li>
                                                    <li><a id="A11" href="~/Admin/ChangePassword.aspx" runat="server">تغییر رمز</a></li>
                                                </ul>
                                            </li>
                                             <li class="sub-menu"><a> مدیریت</a>
                                                <ul>
                                                    <li><a id="A4" href="~/Admin/Paper.aspx" runat="server">مقاله ها</a></li>
                                                    <li><a id="A5" href="~/Admin/Help.aspx" runat="server">راهنمای پذیرش</a></li>
                                                    <li><a id="A6" href="~/Admin/Gallery.aspx" runat="server">گالری</a></li>
                                                    <li><a id="A7" href="~/Admin/Sentence.aspx" runat="server">جمله روز</a></li>
                                                </ul>
                                             </li>
                                             <li class="active sub-menu"><a>آزمایش</a>
                                                <ul>
                                                    <li ><a id="A8" href="~/Admin/Category.aspx" runat="server">گروه آزمایش</a></li>
                                                    <li><a id="A9" href="~/Admin/CategoryItem.aspx" runat="server">آزمایشات</a></li>
                                                </ul>
                                            </li>                                                                                       
                                      </ul>
                                </div>
                          </div>
                        </div>
                  </div>
               </div>
        </div>
    </header>
    <div class="bg-content">
        <!--============================== content =================================-->
        <div id="content">
            <div class="ic">
            </div>
            <div class="container">
                <div class="row">
                    <article class="span12">
              <h3>گروه آزمایشات</h3>

            </article>
                    <div class="clear">
                    </div>
                    <div align="center">
                        <table style="width: 100%" title="گروه آزمایش">
                            <tr>
                                <td style="width: 90px; color: #767676">
                                    عنوان گروه آزمایش:
                                </td>
                                <td style="width: 250px">
                                    <asp:TextBox ID="CategoryTitleTextBox" runat="server" Width="250px"></asp:TextBox>
                                </td>
                                <td style="width: 90px; color: #767676">
                                    سایز صفحه:
                                </td>
                                <td style="width: 100px">
                                    <asp:DropDownList ID="PageSizeDropDownList" SkinID="SearchDropDownList" runat="server">
                                        <asp:ListItem Selected="True" Value="5">[پیش فرض]</asp:ListItem>
                                        <asp:ListItem Value="5">5 رکورد</asp:ListItem>
                                        <asp:ListItem Value="10">10 رکورد</asp:ListItem>
                                        <asp:ListItem Value="15">15 رکورد</asp:ListItem>
                                        <asp:ListItem Value="20">20 رکورد</asp:ListItem>
                                        <asp:ListItem Value="25">25 رکورد</asp:ListItem>
                                        <asp:ListItem Value="1000000">تمام رکورد ها</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 80px">
                                    <asp:ImageButton ID="SearchImageButton" runat="server" OnClick="SearchImageButton_Click"
                                        SkinID="SearchButton" />
                                    <asp:ImageButton ID="ClearImageButton" runat="server" OnClick="ClearImageButton_Click"
                                        OnClientClick="return false;" SkinID="ClearButton" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    <table>
                                        <tr>
                                            <td style="width: 353px;" valign="top">
                                                <asp:GridView ID="CategoryGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"
                                                    DataSourceID="CategoryEntityDataSource" HorizontalAlign="Center" OnSelectedIndexChanged="CategoryGridView_SelectedIndexChanged"
                                                    PageSize="5" Width="300px" AllowSorting="True">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="SelectImageButton" runat="server" CommandName="Select" SkinID="SelectButton" />
                                                            </ItemTemplate>
                                                            <ItemStyle Width="25px" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="CategoryID" Visible="False" />
                                                        <asp:BoundField DataField="CategoryTitle" HeaderText="عنوان گروه آزمایش" SortExpression="CategoryTitle">
                                                            <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                </asp:GridView>
                                            </td>
                                            <td style="width: 20px">
                                            </td>
                                            <td valign="top" align="center">
                                                <asp:FormView ID="CategoryFormView" runat="server" DataSourceID="CategoryEntityDataSource"
                                                    DataKeyNames="CategoryID" DefaultMode="Insert" OnItemDeleted="CategoryFormView_ItemDeleted"
                                                    OnItemCommand="CategoryFormView_ItemCommand" Width="500px">
                                                    <EditItemTemplate>
                                                        <table border="0" cellpadding="0" cellspacing="0" style="width: 500px">
                                                            <tr valign="middle">
                                                                <td style="width: 150px" align="right">
                                                                    عنوان گروه آزمایش :
                                                                </td>
                                                                <td style="width: 350px" align="right">
                                                                    <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("CategoryTitle") %>'
                                                                        MaxLength="500" Width="300px" />
                                                                    <asp:RequiredFieldValidator ID="TitleRequiredFieldValidator" runat="server" ControlToValidate="TitleTextBox"
                                                                        Display="Dynamic" ErrorMessage="*" ValidationGroup="Update"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                            <tr valign="middle">
                                                                <td style="width: 150px" align="right">
                                                                    توضیحات :
                                                                </td>
                                                                <td>
                                                                </td>
                                                            </tr>
                                                            <tr valign="middle">
                                                                <td colspan="2" align="right" dir="rtl">
                                                                    <asp:TextBox ID="DescriptionTextBox" runat="server" Text='<%# Bind("Description") %>'
                                                                        TextMode="MultiLine" MaxLength="2500" Height="150px" Width="480px" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2" align="left">
                                                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                                                        <tr>
                                                                            <td style="height: 15px">
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px;">
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px;">
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px;">
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td style="height: 15px">
                                                                                &nbsp;
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px">
                                                                                <asp:ImageButton ID="DeleteImageButton" runat="server" CausesValidation="False" CommandName="Delete"
                                                                                    SkinID="DeleteButton" OnClientClick="if (!confirm('آيا از حذف مطمئن هستيد؟')) return false;" />
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px">
                                                                                <asp:ImageButton ID="UpdateImageButton" runat="server" CommandName="Update" SkinID="UpdateButton"
                                                                                    ValidationGroup="Update" OnClientClick="if (!confirm('آيا از اعمال تغییرات مطمئن هستيد؟')) return false;" />
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px">
                                                                                <asp:ImageButton ID="CancelImageButton" runat="server" CommandName="Cancel" SkinID="CancelButton" />
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </EditItemTemplate>
                                                    <InsertItemTemplate>
                                                        <table border="0" cellpadding="0" cellspacing="0" style="width: 500px">
                                                            <tr valign="middle">
                                                                <td style="width: 150px" align="right">
                                                                    عنوان گروه آزمایش :
                                                                </td>
                                                                <td style="width: 350px" align="right">
                                                                    <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("CategoryTitle") %>'
                                                                        MaxLength="500" Width="300px" />
                                                                    <asp:RequiredFieldValidator ID="TitleRequiredFieldValidator" runat="server" ControlToValidate="TitleTextBox"
                                                                        Display="Dynamic" ErrorMessage="*" ValidationGroup="Insert"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                            <tr valign="middle">
                                                                <td style="width: 150px" align="right">
                                                                    توضیحات :
                                                                </td>
                                                                <td>
                                                                </td>
                                                            </tr>
                                                            <tr valign="middle">
                                                                <td colspan="2" align="right" dir="rtl">
                                                                    <asp:TextBox ID="DescriptionTextBox" runat="server" Text='<%# Bind("Description") %>'
                                                                        TextMode="MultiLine" MaxLength="2500" Height="150px" Width="480px" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2" align="left">
                                                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                                                        <tr>
                                                                            <td style="height: 15px">
                                                                                &nbsp;
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px">
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px">
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td style="height: 15px">
                                                                                &nbsp;
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px;">
                                                                                <asp:ImageButton ID="InsertButton" runat="server" CommandName="Insert" SkinID="InsertButton"
                                                                                    ValidationGroup="Insert" />
                                                                            </td>
                                                                            <td align="left" valign="top" style="width: 110px;">
                                                                                <asp:ImageButton ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                                                                                    SkinID="CancelButton" />
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </InsertItemTemplate>
                                                </asp:FormView>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <asp:EntityDataSource ID="CategoryEntityDataSource" runat="server" ConnectionString="name=DefaultEntityConnection"
            DefaultContainerName="DefaultEntityConnection" EntitySetName="Categories" Where="(@CategoryTitle is null || it.CategoryTitle LIKE '%' + @CategoryTitle + '%')"
            EnableUpdate="True" EnableDelete="True" EnableInsert="True" EnableFlattening="False"
            OnDeleted="CategoryEntityDataSource_Command" OnInserted="CategoryEntityDataSource_Command"
            OnUpdated="CategoryEntityDataSource_Command" AutoGenerateOrderByClause="True">
            <WhereParameters>
                <asp:ControlParameter ControlID="CategoryTitleTextBox" Name="CategoryTitle" Type="String" />
            </WhereParameters>
            <OrderByParameters>
                <asp:ControlParameter ControlID="CategoryGridView" Name="OrderBy" PropertyName="SortExpression"
                    Type="String" />
            </OrderByParameters>
        </asp:EntityDataSource>
        <asp:HiddenField ID="CategoryIDHiddenField" runat="server" />
        <!--============================== footer =================================-->
        <footer>
          <div class="container clearfix" style="text-align:center">  
             <div class="privacy pull-left">Delta System Anahita <a href="http://www.Delta.com/" target="_blank" rel="nofollow">Delta.com</a></div>
          </div>
    </footer>
    </form>
</body>
</html>
